package org.study.shardingsphere.boot.model;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 测试自定义主键生成
 *
 * @author Administrator
 * @date 2021-04-20
 */
@Data
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_test_model")
public class TestModel implements Serializable {
    private static final long serialVersionUID = -450639702472966470L;

    @TableId(value = "id")
    private Long id;

    @TableField(value = "name")
    private String name;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private Date createTime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;
}
